<template>
  <div class="wrap">
    <Tree :data="data" :checked="checked" treeType="check" />
  </div>
</template>

<script>
import Tree from "../components/Tree/Tree.vue";
export default {
  name: "wrap",
  data() {
    return {
      data: [
        {
          id: "1",
          label: "一级 1",
          children: [
            {
              id: "1-1",
              label: "二级 1-1",
              children: [
                {
                  id: "1-1-1",
                  label: "三级 1-1-1",
                },
                {
                  id: "1-1-2",
                  label: "三级 1-1-2",
                },
              ],
            },
          ],
        },
        {
          id: "2",
          label: "一级 2",
          children: [
            {
              id: "2-1",
              label: "二级 2-1",
              children: [
                {
                  id: "2-1-1",
                  label: "三级 2-1-1",
                },
              ],
            },
            {
              id: "2-2",
              label: "二级 2-2",
              children: [
                {
                  id: "2-2-1",
                  label: "三级 2-2-1",
                },
              ],
            },
          ],
        },
        {
          id: "3",
          label: "一级 3",
          children: [
            {
              id: "3-1",
              label: "二级 3-1",
              children: [
                {
                  id: "3-1-1",
                  label: "三级 3-1-1",
                },
              ],
            },
            {
              id: "3-2",
              label: "二级 3-2",
              children: [
                {
                  id: "3-2-1",
                  label: "三级 3-2-1",
                },
              ],
            },
          ],
        },
      ],
      checked: ["1", "2-1", "3-1-1"],
    };
  },
  components: {
    Tree,
  },
  computed: {},
  mounted() {},
  methods: {},
};
</script>

<style scoped></style>
